import { Column } from "typeorm";
import { EntityModel } from "@midwayjs/orm";

@EntityModel("local_accounts", { schema: "simfeng" })
export class LocalAccounts {
  @Column("varchar", {
    primary: true,
    name: "username",
    comment: "用户名称",
    length: 255,
  })
  username: string;

  @Column("varchar", {
    name: "password",
    nullable: true,
    comment: "密码",
    length: 255,
  })
  password: string | null;

  @Column("int", { name: "user_id", nullable: true, comment: "用户ID" })
  userId: number | null;

  @Column("datetime", { name: "created_at" })
  createdAt: Date;

  @Column("datetime", { name: "updated_at" })
  updatedAt: Date;
}
